package com.example.ending_demo.model;

public class Address {
    private int address_id;
    private int user_id;
    private String addr_username;
    private String addr_phone;
    private String addr_email;
    private String address;

    public Address() {
    }

    public Address(int address_id, int user_id, String addr_username, String addr_phone, String addr_email, String address) {
        this.address_id = address_id;
        this.user_id = user_id;
        this.addr_username = addr_username;
        this.addr_phone = addr_phone;
        this.addr_email = addr_email;
        this.address = address;
    }

    public int getAddress_id() {
        return address_id;
    }

    public void setAddress_id(int address_id) {
        this.address_id = address_id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public String getAddr_username() {
        return addr_username;
    }

    public void setAddr_username(String addr_username) {
        this.addr_username = addr_username;
    }

    public String getAddr_phone() {
        return addr_phone;
    }

    public void setAddr_phone(String addr_phone) {
        this.addr_phone = addr_phone;
    }

    public String getAddr_email() {
        return addr_email;
    }

    public void setAddr_email(String addr_email) {
        this.addr_email = addr_email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    @Override
    public String toString() {
        return "Address{" +
                "address_id=" + address_id +
                ", user_id=" + user_id +
                ", addr_username='" + addr_username + '\'' +
                ", addr_phone='" + addr_phone + '\'' +
                ", addr_email='" + addr_email + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Address address = (Address) o;

        return address_id == address.address_id;
    }

    @Override
    public int hashCode() {
        return address_id;
    }
}
